﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace NAccounting.QueryObjects
{
    public abstract class QueryObject<T>
    {
        public NAccountEntities Context { get; private set; }

        public QueryObject(NAccountEntities context)
        {
            if ((Context = context) == null) throw new ArgumentNullException("context");
        }

        public abstract PagedResult<T> Get(int pageIndex, int rows);

        public virtual IEnumerable<T> Get(){ throw new NotImplementedException(); }
        protected virtual bool Condition(T entity) { throw new NotImplementedException(); }
    }
}